package homework;

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.print("输入第一个数字");
        int num1 = scan.nextInt();
        System.out.print("输入第二个数字");
        int num2 = scan.nextInt();
        int sum1 = sum1(num1, num2);
        double sum2 = sum2((double) num1, (double) num2);
        System.out.println("整数和为" + sum1);
        System.out.println("小数和为" + sum2);
    }
    public static int sum1(int num1,int num2){
        return num1 + num2;
    }
    public static double sum2(double num1,double num2){
        return num1 + num2;
    }
}
